home *** CD-ROM | disk | FTP | other *** search
/ Aminet 7 / Aminet 7 - August 1995.iso / Aminet / text / hyper / ADtoHT2_1.lha / Source.lha / MyLib.lha / string / strncmp.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-08  |  322 b   |  18 lines

  1. #include <string.h>
  2.  
  3. /************************************************************************/
  4.  
  5. int (strncmp)(const char *String1, const char *String2, size_t Size)
  6.  
  7. {
  8.   int Result;
  9.  
  10.   Result=0;
  11.   if (Size != 0)
  12.     {
  13.       while (!(Result=*String1++-*String2) && *String2++ && (--Size != 0))
  14.     ;
  15.     }
  16.   return Result;
  17. }
  18.